package com.springboot2.shiro.data.enity;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.springboot2.shiro.comm.entity.JpaEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Role
 *
 * @author Archx[archx@foxmail.com]
 * at 2018/7/13 21:10
 */
@Entity
@Getter
@Setter
@Table(name = "tb_roles")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class Role extends JpaEntity<Integer> {

    @Column(name = "name", length = 64)
    private String name;

    @Column(name = "description", length = 255)
    private String description;

    /**
     * 使用资源IDs替代中间表
     */
    @Column(name = "resource_ids", length = 255)
    private String resourceIds;
}
